import React from 'react';
import {
  View,
  Text,
} from 'react-native';

import SizeUtils from '../../common/SizeUtils';
import Config from '../../config';
import TImage from '../../components/TImage';
import CommonListPage from '../common/CommonListPage';
import HeartLoveItemView from './HeartLoveItemView';
import HeartLoveRequestUsersAction from '../../actions/heart/HeartLoveRequestUsersAction';
export default class HeartLoveListPage extends CommonListPage {
  constructor(props) {
    super(props);

    this._dataKey = "lover_id";
  }


  _onRenderItem(data, index) {
    return <HeartLoveItemView data={data} myLoveData={this.props.pageData.routeData.myLoveData} />
  }

  _onPressItem(data) {

  }

  _requestData(page,listView) {
    new HeartLoveRequestUsersAction().call(listView, {page:page, sort_id:1});
  }

  _renderNavigationBarRightButtonContent() {
    return (
      <View>
        <TImage source={require("../../../resource/images/workhard/search.png")}
          style={{width:34, height:34}}/>
      </View>
    )
  }

  _onPressNavigationBarRightBtn() {
    this.gotoPage(Config.pages.heart_love_search, {myLoveData:this.props.pageData.routeData.myLoveData});
  }
}
